package com.originskyseed.platform.user.service;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONArray;
import com.originskyseed.platform.core.base.BasePage;
import com.originskyseed.platform.user.model.ParameterConfigure;

/**
 * 参数配置Service接口类（OSI_PARAMETER_CONFIGURE）
 *
 * @author Tangwanghui
 */
public interface IParameterConfigureService {

	/**
	 * 删除记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(ParameterConfigure record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(ParameterConfigure record) throws Exception;

	/**
	 * 更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(ParameterConfigure record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(ParameterConfigure record) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public ParameterConfigure selectByPrimaryKey(String id) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<ParameterConfigure> selectList(ParameterConfigure record) throws Exception;

	/**
	 * 分页查询列表
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<ParameterConfigure> selectListByPage(Map<String, Object> params, BasePage<ParameterConfigure> page) throws Exception;

	/**
	 * 查询参数配置树
	 *
	 * @return
	 * @throws Exception
	 */
	public JSONArray selectParameterConfigureTree() throws Exception;

	/**
	 * 查询code是否存在
	 *
	 * @param parameterConfigure
	 * @return
	 * @throws Exception
	 */
	public boolean existCode(ParameterConfigure parameterConfigure) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param code
	 * @return
	 * @throws Exception
	 */
	public ParameterConfigure selectByCode(String code) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param code
	 * @return
	 * @throws Exception
	 */
	public ParameterConfigure selectByCode(String tenantCode,String code) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param code
	 * @return
	 * @throws Exception
	 */
	public List<ParameterConfigure> selectByParentCode(String code) throws Exception;

	/**
	 * 查询所有参数
	 *
	 * @param parentId
	 * @return
	 * @throws Exception
	 */
	public List<ParameterConfigure> selectListByParentId(String parentId) throws Exception;


	/**
	 * 查询所有参数
	 *
	 * @param parentId
	 * @return
	 * @throws Exception
	 */
	public List<ParameterConfigure> selectListByParentId(String tenantCode,String parentId) throws Exception;
}
